<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
        <body>
        <div th:text="${names[0]}"></div>
        <div th:text="${names[1]}"></div>
        <div th:text="${names[2]}"></div>
        <div>------------------------------</div>

        <div th:each="name:${names}">
            <div th:text="${name}"></div>
        </div>
        <div>------------------------------</div>

        <div th:each="student,stat:${students}">
            index:<span th:text="${stat.index}"></span><br/>
            count:<span th:text="${stat.count}"></span><br/>
            size:<span th:text="${stat.size}"></span><br/>
            even:<span th:text="${stat.even}"></span><br/>
            odd:<span th:text="${stat.odd}"></span><br/>
            name:<span th:text="${student.name}"></span><br/>
            age:<span th:text="${student.age}"></span><br/>
        </div>
        <table>
            <tr><td>序号</td><td>姓名</td><td>年龄</td></tr>
            <tr th:each="student,stat1:${students}" th:style="${stat1.even}?'background-color: red':'background-color:blue'">
                <td th:text="${stat1.count}"></td>
                <td th:text="${student.name}"></td>
                <td th:text="${student.age}"></td>
            </tr>
        </table>
</body>
</html>